#pragma once
#include "Globals.h"
#include "Laser.h"

#define DXTEXTURE3 IDirect3DTexture9*
#define ID3DDEVICE IDirect3DDevice9


class Graphics3D
{
protected:

	//=====UPDATE VARIABLES
	D3DXMATRIX				mWorldMat;	//World
	D3DXMATRIX				mTransMat;	//Translation
	D3DXMATRIX				mScaleMat;	//Scale
	D3DXMATRIX				mPerspMat;	//Perspective
			
	//=====RENDER VARIABLES
	char*					m_cszMeshNames[D3OBJ_SIZE];	//Name:  Meshes
	char*					m_cszTexNames [PLAY_SIZE];
	ID3DXMesh*				mdMeshes	  [D3OBJ_SIZE];	//Index: Meshes
	DXTEXTURE3				mdTextures	  [D3OBJ_SIZE];	//Index: Textures
	D3DXVECTOR3				mdTexCenter	  [D3OBJ_SIZE];	//Index: Texture Center Coordinates
	D3DXIMAGE_INFO			mdImageInfo	  [D3OBJ_SIZE];	//Index: ImageInfo
	D3DMATERIAL9			m_dmDefaultMaterial;
	D3DMATERIAL9			m_dmHighLightMaterial;


	//=====EXTERNAL DATA READING
	void LoadTexture(IDirect3DDevice9*,int, string);
	void LoadMeshFile(IDirect3DDevice9*,const char*, ID3DXMesh*&);

public:

	//=====CONSTRUCTORS
	Graphics3D(){};										//Default Constructor
	//=====INITIALIZE
	void Initialize	 (IDirect3DDevice9*);
	bool InitTextures(IDirect3DDevice9*);
	bool InitMeshes	 (IDirect3DDevice9*);
	

	//=====DRAW
	bool Render(IDirect3DDevice9*,DrawList&);


};